package com.mapper;

import com.entity.LotteryPrize;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @InterfaceName LotteryPrizeMapper
 * @Description 抽奖奖品持久层接口
 * @Author Kx
 * @Date 2025/6/17 20:34
 * @Version 1.0
 */
public interface LotteryPrizeMapper {

    /**
     * @author: kx
     * @date: 2025/6/18 9:13
     * @param lotteryPrize : 奖品信息
     * @description: 添加抽奖奖品信息
    */
    void addLotteryPrize(@Param("lotteryPrize") LotteryPrize lotteryPrize);

    /**
     * @author: kx
     * @date: 2025/6/18 10:21
     * @param lotteryPrize : 奖品信息
     * @description: 修改抽奖奖品信息
    */
    void updateLotteryPrize(@Param("lotteryPrize") LotteryPrize lotteryPrize);

    /**
     * @author: kx
     * @date: 2025/6/18 11:06
     * @return java.util.List<com.entity.LotteryPrize>
     * @description: 查询所有上架奖品信息
    */
    List<LotteryPrize> getAllLotteryPrizes();

    /**
     * @author: kx
     * @date: 2025/6/18 14:20
     * @param id : 奖品id
     * @return com.entity.LotteryPrize
     * @description: 根据id查询奖品信息
    */
    LotteryPrize getLotteryPrizeById(@Param("id") Long id);

    /**
     * @author: kx
     * @date: 2025/6/19 11:15
     * @param pageNum : 页码
     * @param pageSize : 每页显示数量
     * @return java.util.List<com.entity.LotteryPrize>
     * @description: 分页查询所有奖品信息
    */
    List<LotteryPrize> getPagedLotteryPrizes(@Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize);

    /**
     * @author: kx
     * @date: 2025/6/19 11:34
     * @param keyword : 关键字
     * @param pageNum : 页码
     * @param pageSize : 每页显示数量
     * @return java.util.List<com.entity.LotteryPrize>
     * @description: 根据关键字分页查询奖品信息
    */
    List<LotteryPrize> searchLotteryPrizesByKeyWord(@Param("keyword") String keyword, @Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize);
}
